﻿#pragma once

#include <string>
#include <list>
#include <memory>

typedef unsigned int MengYuIDType; 


//给ui显示用的
struct WubiBaseInfo{
    MengYuIDType id = 0;
    std::string name; 

    //方案信息
    int candidate_count = 5;  // 候选词数量
    
    //码表信息
    bool codetable_enable = false; //是否被使用
    unsigned int codetable_index = 0; //码表顺序

    void reset(){
        id = 0;
        name.clear();
        codetable_enable = false;
        candidate_count = 5;
        codetable_index = 0;
    }
};


//码表一个词条的数据
struct WubiCodetableData{
    MengYuIDType id = 0;
    std::string word;
    int idx = 0; // 码表顺序
};

//typedef std::shared_ptr<WubiBaseInfo> WubiBaseInfoPtr;

class WubiBaseInfoPtr{
   WubiBaseInfo _info;
   
   public: 

   WubiBaseInfo* operator->(){
        return &_info;
   }

    const WubiBaseInfo* operator->() const{
        return &_info;
    }
};

